ubusd: make txq_len field signed
authorFelix Fietkau <[email protected]>
Tue, 1 Jul 2025 17:50:45 +0000 (19:50 +0200)
committerFelix Fietkau <[email protected]>
Tue, 1 Jul 2025 17:51:10 +0000 (19:51 +0200)
When enqueueing a partial message, the length is initially set to a
negative value. Fixes part of the enqueue queue length check.

Signed-off-by: Felix Fietkau <[email protected]>
ubusd.h

diff --git a/ubusd.h b/ubusd.h
index f43b9360d3367db0a1b70cf2491326b306a54a12..1913c66bb67a71cbb5f1ea3ca19212ac8904cebc 100644 (file)
--- a/ubusd.h
+++ b/ubusd.h
@@ -62,7 +62,7 @@ struct ubus_client {
        struct list_head cmd_queue;
        struct list_head tx_queue;
        unsigned int txq_ofs;
-       unsigned int txq_len;
+       ssize_t txq_len;
 
        struct ubus_msg_buf *pending_msg;
        struct ubus_msg_buf *retmsg;